<?php
if (!defined("_INDEX")) { header("Location: /"); die; }

$poll_id = $route->getAdminId();
$db->sendQuery("delete from `user_answers` where `poll_id` = '$poll_id'");
$db->sendQuery("delete from `answers` where `poll_id` = '$poll_id'");
$db->sendQuery("delete from `polls` where `poll_id` = '$poll_id' limit 1");

goToPage("/admin/polls/view");

?>